//
//  HMSportViewController.m
//  黑马行
//
//  Created by 宇宙执政 on 16/9/19.
//  Copyright © 2016年 yujianbinMAC. All rights reserved.
//

#import "HMSportViewController.h"
#import "HMSportSportingViewController.h"
#import "HMSportTracking.h"

@interface HMSportViewController ()

@end

@implementation HMSportViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (IBAction)startSport:(UIButton *)sender {
    
    //1,根据按钮的tag来设置运动类型
     NSUInteger type = sender.tag;
    
    //2,通过storyboard加载控制器
    UIStoryboard *sb = [UIStoryboard storyboardWithName:@"HMSportSporting" bundle:nil];
    HMSportSportingViewController *sportingVC = sb.instantiateInitialViewController;
    sportingVC.sportType = type;
    
    
    //4,展现控制器
    [self presentViewController:sportingVC animated:YES completion:nil];
    
}



@end
